home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / reve / extern.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  8.8 KB  |  161 lines

  1.  
  2. /*  @(#)extern.h 1.22 91/11/13
  3.  *
  4.  *  Contains the external variable definitions used by reve.
  5.  *
  6.  *  Copyright (C) 1990, 1991 - Rich Burridge & Yves Gallot.
  7.  *  All rights reserved.
  8.  *
  9.  *  Permission is granted to copy this source, for redistribution
  10.  *  in source form only, provided the news headers in "substantially
  11.  *  unaltered format" are retained, the introductory messages are not
  12.  *  removed, and no monies are exchanged.
  13.  *
  14.  *  Permission is also granted to copy this source, without the
  15.  *  news headers, for the purposes of making an executable copy by
  16.  *  means of compilation, provided that such copy will not be used
  17.  *  for the purposes of competition in any othello tournaments, without
  18.  *  prior permission from the authors.
  19.  *
  20.  *  No responsibility is taken for any errors on inaccuracies inherent
  21.  *  either to the comments or the code of this program, but if reported
  22.  *  (see README file), then an attempt will be made to fix them.
  23.  */
  24.  
  25. extern int bborder ;       /* Size of the reve game board border. */
  26. extern int best_cmove ;    /* Best computer move so far. */
  27. extern int board_height ;  /* Height of the reve game board in pixels. */
  28. extern int board_width ;   /* Width of the reve game board in pixels. */
  29. extern int but_inverted ;  /* Value of panel item inverted. */
  30. extern int cell_height ;   /* Height of an individual game board square. */
  31. extern int cell_width ;    /* Width of an individual game board square. */
  32. extern int cmove_depth ;   /* Depth of the current best computer move. */
  33. extern int color ;         /* Current color value. */
  34. extern int cur_ch ;        /* Current character pressed. */
  35. extern int curx ;          /* Current mouse X position. */
  36. extern int cury ;          /* Current mouse Y position. */
  37. extern int debug ;         /* If set, prints out various debug messages. */
  38. extern int down ;          /* Indicates is a mouse button is down. */
  39. extern int first_move ;    /* Set if computer plays first move. */
  40. extern int help_height ;   /* Height of the help window. */
  41. extern int help_showing ;  /* If set, the help window is visible. */
  42. extern int help_width ;    /* Width of the help window. */
  43. extern int iconic ;        /* Start as an icon if set. */
  44. extern int inv_video ;     /* Set if displaying in inverse video. */
  45. extern int invalid ;       /* Set if last move was invalid. */
  46. extern int isblack ;       /* Set if human to play the black pieces. */
  47. extern int iscolor ;       /* Set if this is a color screen. */
  48. extern int isremote ;      /* Set if playing remote user@host. */
  49. extern int iswhite ;       /* Set if human to play the white pieces. */
  50. extern int itemno ;        /* Current panel item being processed. */
  51. extern int item_value ;    /* Value for current panel item. */
  52. extern int ix ;            /* Initial X position of the icon. */
  53. extern int iy ;            /* Initial Y position of the icon. */
  54. extern int last_move ;     /* Last valid computer move. */
  55. extern int last_outline ;  /* Position of last piece whilst dragging. */
  56. extern int level ;         /* Current difficulty level for computer moves. */
  57. extern int loadgame ;      /* Set if there is a game file to load. */
  58. extern int lsval ;         /* Set to 'l' or 's', if loading or saving. */
  59. extern int max_depth ;     /* Computer strategy - maximum depth. */
  60. extern int monochrome ;    /* If set, display will be in monochrome. */
  61. extern int move ;          /* Current move being evaluated. */
  62. extern int move_delta ;    /* Delta for piece animation. */
  63. extern int nextc ;         /* Current event identifier. */
  64. extern int next_player ;   /* Next player (BLACK or WHITE) to move. */
  65. extern int old_diffval ;   /* Old difficulty value (possibly restored). */
  66. extern int opp_bell ;      /* If set, sound bell after opponents move. */
  67. extern int opp_iconise ;   /* If set, close reve window for opponents move. */
  68. extern int opp_raise ;     /* If set, auto raise window after opponent move. */
  69. extern int pid ;           /* Process id of the reve_proc process. */
  70. extern int piece_x ;       /* Current X position of moving piece. */
  71. extern int piece_y ;       /* Current Y position of moving piece */
  72. extern int pieceXmargin ;  /* X margin between piece and cell width. */
  73. extern int pieceXrad ;     /* X radius of board piece. */
  74. extern int pieceYmargin ;  /* Y margin between piece and cell height. */
  75. extern int pieceYrad ;     /* Y radius of board piece. */
  76. extern int pipe_io[2][2] ;
  77. extern int play_computer ; /* Set if playing against the computer. */
  78. extern int posspec ;       /* Set if -Wp or -g option is present (for X11) */
  79. extern int processing ;    /* If set, computer is procesing a move. */
  80. extern int profmax ;       /* Current maximum depth. */
  81. extern int props_showing ; /* If set, the property window is visible. */
  82. extern int restore_moves ; /* Indicates if legal moves should be reshown. */
  83. extern int s_flip ;
  84. extern int s_move ;
  85. extern int s_opponent ;
  86. extern int s_player ;
  87. extern int s_row ;
  88. extern int s_col ;
  89. extern int saveres ;       /* If set, save computer results to log file. */
  90. extern int show_moves ;    /* If set, all possible moves are being shown. */
  91. extern int snote ;         /* Note value for current suggestion. */
  92. extern int socketfd ;      /* Socket no. for user@host. */
  93. extern int sstate ;        /* State of suggestion (showing/not showing). */
  94. extern int started ;       /* Set just before window is displayed. */
  95. extern int suggestion ;    /* Positive if a suggested move. */
  96. extern int timevals[] ;    /* Total time (in minutes) for each diff. level. */
  97. extern int tinput  ;       /* Set, when getting text input for load/save. */
  98. extern int tx, ty ;        /* Position of text field. */
  99. extern int tw, th ;        /* Size of text field. */
  100. extern int validkey ;      /* Set if half way though a valid multiple key. */
  101. extern int wx ;            /* Initial X position of the window. */
  102. extern int wy ;            /* Initial Y position of the window. */ 
  103. extern int xdebug ;        /* If set, turns on debugging in the X11 driver. */
  104.  
  105. extern FILE *hfp ;               /* File descriptor for online help file. */
  106.  
  107. extern long help_offsets[] ;     /* Offsets into the reve help file. */
  108.  
  109. extern char *colstr[] ;          /* X resource color values. */
  110. extern int font_heights[] ;      /* Height of all fonts used. */
  111. extern int rcols[] ;             /* Red colormap values. */
  112. extern int gcols[] ;             /* Green colormap values. */
  113. extern int bcols[] ;             /* Blue colormap values. */
  114.  
  115. extern time_t last_btime ;       /* Last black time value. */
  116. extern time_t last_wtime ;       /* Last white time value. */
  117. extern time_t start_time ;       /* Start time for current move. */
  118. extern time_t timeleft ;         /* Amount of time left for computer moves. */
  119. extern long edges[] ;            /* Edges Stability Table */
  120. extern long note ;               /* Note value for current computer move. */
  121.  
  122. extern char *bfontname ;         /* Bold font name. */
  123. extern char *hfontname ;         /* Help font name. */
  124. extern char *nfontname ;         /* Normal font name. */
  125.  
  126. extern char *bstone_name ;       /* "Black" stone name for messages. */
  127. extern char *diff_values[] ;     /* Values for cyclic difficulty button. */
  128. extern char *display ;           /* X11 display information. */
  129. extern char *comp_values[] ;     /* Values for computer plays button. */
  130. extern char edgefile[] ;         /* Location of the reve edge table file. */
  131. extern char *fontnames[] ;       /* Font names (via X resources). */
  132. extern char gamefile[] ;         /* Name of file for load/save. */
  133. extern char geometry[] ;         /* X11 geometry information. */
  134. extern char helpfile[] ;         /* Location of the reve online help file. */
  135. extern char line[] ;
  136. extern char *notes_values[] ;    /* Values for cyclic notes button. */
  137. extern char *opponent ;          /* user@host for remote networked person. */
  138. extern char *player_values[] ;   /* Values for cyclic black/white item. */
  139. extern char *printcommand ;      /* Command for printing the game. */
  140. extern char progname[] ;         /* The name of this program. */
  141. extern char *resources[] ;       /* Reve X resources read. */
  142. extern char reveproc[] ;         /* Pathname of the reve_proc program. */
  143. extern char *wstone_name ;       /* "White" stone name for messages. */
  144.  
  145. extern FILE *rem_fp ;
  146. extern struct timeval tp ;        /* Used by the nap_upto routine. */
  147.  
  148. extern struct iteminfo items[] ;  /* Information records for button items. */
  149.  
  150. extern BOARD board ;              /* The current reve board. */
  151. extern BOARD old_board ;          /* The previous reve board. */
  152. extern BOARD *s_pos ;
  153. extern BOARD s_all ;              /* List of valid positions for this move. */ 
  154. extern BOARD moves[64] ;          /* Complete array of board moves. */
  155.  
  156. extern enum cantype cmode, last_cmode ;
  157. extern enum disp_type dtype ;
  158. extern enum gr_type gtype ;        /* Graphics type. */
  159. extern enum set_type direction ;   /* Incremental direction for cycle item. */
  160. extern enum win_type curwin ;      /* Window the current event for in. */
  161.